import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';

import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import p002 from './p002';
import p003 from './p003';


interface Iparam extends Event {
	page_no: number;
}

export default async function a003(fd: IFeidaoAiBrowserComponent, e: Iparam) {

	const page_no = e.page_no;

	console.log("ssssssssssss", page_no);


	const res = await nodejs<{ res: Array<{}>; c: number; }>('risk_point/zj-000005/s001', {
		hidden_source: '',
		hidden_name: '',
		page_no

	});

	console.log("youwu666 ...", res);
	if (res.res.length > 0) {
		render(fd, res.res, p001, 'p001', 'inner');
		render(fd, { page_no, total: res.c }, p002, 'p002', 'inner');
	} else {
		render(fd, '', p003, 'p003', 'inner');
	}
}
